#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "serial_ui.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void serial_write(void *buf, uint16_t len);

private slots:
    void on_rcv_serial_data(void);
    void on_pushButton_scanCom_clicked();
    void on_pushButton_send_clicked();
    void on_serial_op_output_infor(QString);
    void on_pushButton_loadFile_clicked();
    void on_pushButton_simulateHandle_clicked();
    void on_tableWidget_show_clicked(const QModelIndex &index);
    void on_rcv_for_tableWidget(QString dir_str, QString byte_cnt_str, QString frame_str, QString frame_char_str);

    void on_pushButton_continueUpdate_clicked();
    void on_pushButton_losePkt_clicked();
    void on_pushButton_pauseUpdate_clicked();

private:
    Ui::MainWindow *ui;
};

void serial_write(void *buf, int16_t len);

#endif // MAINWINDOW_H
